
from base.mybase import Tools


class completetask_model(Tools):

    # 定义路径
    path = '/task/info'

    # 发送注册请求
    def completetask_action(self,task_id,hb):
        mydata = {
            "task_id": task_id,

        }
        res = self.huihua.put(url=self.hosturl+self.path,data=mydata,headers=hb)
        return res.json()

# from todo_api_project.api.login_api import login_model

# import requests
# s = requests.session()
# reg = login_model(huihua=s)
# msg = reg.login_action(usr='ueuquu1342',pwd='afhahfhai34')
# getuserid = msg['userId']
# getusertoke = msg['userToken']
# hb = {'userid':getuserid,'userToken':getusertoke}
# print(hb)
# creaktask = creattask_model(huihua=s)
# msg = creaktask.creattask_action(title='香蕉',hb=hb)
# gettaskid = msg['taskid']
# completetask = completetask_model(huihua=s)
# ss = completetask.completetask_action(task_id=gettaskid,hb=hb)
# print(ss)
